Properly handling the doPost and doGet methods for dynamically created servlet content is rather tricky. This web page discusses the Post-Redirect-Get pattern for building servlets. Unfortuantely, not much is provided in the way of concrete examples. I think I finally understood what was meant here and I implemented this in the TradeEngine.java servlet.
Redirect After Post by Michael Jouravlev